@import "global.scss";

@font-face {
    font-family: "Fira Code Arturo";
    src: url('../fonts/FiraCode-Regular.ttf') format('truetype');
}

html,body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: -0.39px;
}

a:hover {
    color: #3273dc;
    border-bottom:1px solid #3273dc;
}

nav ul li a {
    border-bottom: 1px solid white;
    

    &:hover {
        color: #3273dc !important;
    }
}

#downloads a {
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 0.5em;

    &:hover {
        border: 1px solid #3273dc;
        border-radius: 20px;
        padding: 0.5em;
    }
}

.hero {
    background: $purple-fade;
    background: linear-gradient(0deg, $purple-fade 50%, $main-purple 100%);
}

.breadcrumb a {
    padding: 0;
    margin: 0 .75em;
}
a.navbar-item:hover {
    border-bottom: 0;
}

.menu ul li a:hover {
    border-bottom: 0;
}

.tag:not(body){
    border-radius: 0 !important;
    color: #FFF;

    .is-stars   {background-color:#999;}
    .is-chat    {background-color:#ff7d37;}
    .is-build   {background-color: #45cb11;}
}

.screenshot {
    // box-shadow: 0 0 28px 3px #7a347b; 
    mix-blend-mode: luminosity; 
    opacity: 66%;
    border-radius: 10px;

    &:hover {
        // mix-blend-mode: normal;
        opacity: 100%;
    }
}

.tag:not(body).is-stars {
    background-color:#999;
    color: #FFF;
}
.tag:not(body).is-license {
    background-color: #97ca00;
    color:#FFF;
}
.tag:not(body).is-chat {
    background-color:#ff7d37;
    color:#FFF;
}
.tag:not(body).is-build {
    background-color: #45cb11;
    color:#FFF;
}

.motto {
    -webkit-background-clip: text; 
    -moz-background-clip: text; 
    background-clip: text; 
    color: transparent; 
    text-shadow: rgba(255,255,255,0.5) 0px 3px 3px; 
    font-size:40px; 
    font-weight:bold; 
    color:#DDD;
    margin-bottom:2em;
}

.card {
    box-shadow: none !important;
    border: 1px solid #E6E6E6;
}

#at-a-glance {
    .card-image {
        font-size:5em;
    }

    a {
        .holder {
            color: #4a4a4a;
            border-radius: 5px;
            border: 1px solid #E6E6E6;
        }

        &:hover {
            .holder {
                color: #3273dc;
                border: 1px solid #3273dc;

                h5 {
                    color: #3273dc;
                }
            }

            // h5 {
            //     border-bottom: 1px solid #3273dc;
            // }
        }
    }

}

a:hover {
    .tile.box {
        border: 1px solid #3273dc;
    }
}

.footer {
    padding-bottom: 3em;
    /*-moz-box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0 -5px 6px rgba(0, 0, 0, 0.5);
    box-shadow: 0 -25px 45px #f4f4f4;*/
    position: relative;
    border-top: 1px solid #EEE;

    small {
        color: #BBB;

        a {
            color: #888;

            &:hover {
                border-bottom: 1px solid #888;
            }
        }
    }
}

sup {
    font-variant: all-small-caps;
}

.table td, .table th {
    vertical-align: middle;
}

.fab {
    vertical-align: middle;
}

.first-td {
    text-align: center !important;
}

@media screen and (min-width: 1024px){
.navbar-link.is-active:not(:focus):not(:hover), a.navbar-item.is-active:not(:focus):not(:hover) {
    background-color:$main-purple; 
}}

.navbar-item.is-tab.is-active {
    border-bottom-color:$main-purple;
    color: white;
    background-color:$main-purple; 
}

 .navbar-item.is-tab:focus, .navbar-item.is-tab:hover {
//     background-color: transparent;
     border-bottom-color: transparent; /*$main-purple;*/
}

.navbar-link.is-active, .navbar-link:focus, .navbar-link:focus-within, .navbar-link:hover, a.navbar-item.is-active, a.navbar-item:focus, a.navbar-item:focus-within, a.navbar-item:hover {
    background-color: #fafafa;
    color: $main-purple;
}

code[class*=language-], pre[class*=language-] { 
    font-family: 'Fira Code Arturo', monospace !important; 
}

// @supports (font-variation-settings: normal) {
//     code[class*=language-], pre[class*=language-] { 
//         font-family: 'Fira Code VF', monospace !important; 
//     }
// }

.logo-secondary {
    color: #BBB;
}

.doccols:last-child{
    margin-bottom:0;
}

$sidebarHighlight: #E7E7E7; /*$main-purple;*/
$sidebarFg: black;
$sidebarFront: $main-purple;
$sidebarWhite: white;

.sidebar {
    background:$sidebarHighlight; 
    /*background: #F4F4F4; */
    padding-right:0px !important;
    /*border-right: 2px solid $main-purple;*/
    position: sticky;
    height: calc(100vh - 40px); 
    overflow-y:auto;
    top: 40px;
    bottom: 0;

    // direction:rtl; 

    &::-webkit-scrollbar {
        width: 2px;
      }
       
      &::-webkit-scrollbar-track {
        box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
      }
       
      &::-webkit-scrollbar-thumb {
        background-color:$main-purple; /* darkgrey;*./
        outline: 1px solid $main-purple; /*slategrey;*/
      }
    
    //   .menu-list {
    //     direction:ltr; 
    //   }

    .menu-list li ul {
        border-left: 1px solid #bbbbbb;
    }

    .menu-list a {
        border-radius: 10px 0px 0px 10px;
        color: $sidebarFg;
    
        &.is-active {
            /*background-color: $main-purple;*/
            background-color: $sidebarWhite;
            color: $sidebarFront;
            /*font-weight: bold;*/
        }

        &:not(.is-active):hover {
            background-color:darken($sidebarHighlight, 2%);
            color: darken($sidebarFg, 10%);
        }
    }
}

/* .box {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
} */

hr {
    height: 10px;
}

a.footer-icon {
    text-shadow: rgba(255, 255, 255, 0.5) 0px 3px 3px;
    font-size: 40px;
    font-weight: bold;
    color: #DDD;

    &.github:hover {
        border: 0;
        color: #302F2F;
    }

    &.twitter:hover {
        border: 0;
        color: #1FA1F1;
    }

    &.discord:hover {
        border: 0;
        color: #6F84D5;
    }
}

pre[class*=language-] {
    position: relative;
    overflow: visible;

    .copy {
        content: "copy";
        padding: 2px 10px 0;
        position: absolute;
        top: 0;
        right: 0;
        transform: translate(-10px, -90%);
        border-top-left-radius: 5px;
        border-top-right-radius: 5px;
        color: #CCC;
        background: #272822;
        cursor: pointer;
        /*transition: all 200ms ease;*/
        font-size: 0.8em;

        &:hover {
            color: #fff;
            text-align: center;
            -webkit-animation: glow 1s ease-in-out infinite alternate;
            -moz-animation: glow 1s ease-in-out infinite alternate;
            animation: glow 1s ease-in-out infinite alternate;
        }
    }

    &:hover .copy {
        transform: translate(-10px, -100%);
    }
}


@-webkit-keyframes glow {
    from {
    text-shadow: 0 0 10px #fff;
    }
    to {
    text-shadow: 0 0 20px #fff;
    }
}

code[class*=language-], pre[class*=language-] {
    white-space: pre-wrap; 
}

@media (max-width: 768px) {
    .is-grouped-multiline {
        justify-content: center !important;
    }

    .card {
        border: 0;
    }
}

#searchbar {
    border: 0;
    border-radius: 0;
    border-left: 2px solid $main-purple;
    outline: none;
    width: 30vw;
    font-size: 1.2em;
    padding-left: 50px;
    margin-top: 0px;
    line-height: 1.9em;
}

#searchbar-icon {
    position: relative;
    left: calc(-1 * 30vw + 35.5px);
    top: 18px;
}

a.algolia-docsearch-suggestion:hover {
    border-bottom: 0;
}
@media (max-width: 1023px) {
    .algolia-autocomplete {
        display: none !important;
    }
}

.exampleletter {
    font-size: 2rem;
    display: block;
    list-style: none;
    background: #363636;
    color: #E7E7E7;
    width: 3rem;
    line-height: 3rem;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

#navbarMain {
    font-weight: 500;
}

#mainTitle {
    span {
        display: none !important;
    }

    &:hover {
        span {
            display: inline-block !important;
        }
    }
}

.semibold {
    font-weight: 500;
}

li.source-link {
    margin-left: auto !important;

    a {
        color: #BBBBBB !important;
        font-weight: bold !important;

        &:hover {
            color: #363636 !important;
            font-weight: bold !important;
            border-bottom: 0 !important;
        }
    }

    &:before {
        content: '' !important;
    }
}

#metrics-container {
    margin-top: -1rem !important;
    margin-bottom: -1rem !important;
}

////

.switch {
	position: relative;
	display: block;
	vertical-align: top;
	width: 100px;
	height: 30px;
	padding: 3px;
	margin: 0 10px 10px 0;
	background: linear-gradient(to bottom, #eeeeee, #FFFFFF 25px);
	background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF 25px);
	border-radius: 18px;
	box-shadow: inset 0 -1px white, inset 0 1px 1px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	box-sizing:content-box;
}
.switch-input {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	box-sizing:content-box;
}
.switch-label {
	position: relative;
	display: block;
	height: inherit;
	font-size: 13px;
	text-transform: uppercase;
	background: #18c521;//#67b1d9;
	border-radius: inherit;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
	box-sizing:content-box;
}
.switch-label:before, .switch-label:after {
	position: absolute;
	top: 50%;
	margin-top: -.5em;
	line-height: 1;
	-webkit-transition: inherit;
	-moz-transition: inherit;
	-o-transition: inherit;
	transition: inherit;
	box-sizing:content-box;
}
.switch-label:before {
	content: attr(data-off);
	right: 11px;
	color: #FFFFFF;
	text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.switch-label:after {
	content: attr(data-on);
	left: 11px;
	color: #FFFFFF;
	text-shadow: 0 1px rgba(0, 0, 0, 0.2);
	opacity: 0;
}
.switch-input:checked ~ .switch-label {
	background: #671167;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
}
.switch-input:checked ~ .switch-label:before {
	opacity: 0;
}
.switch-input:checked ~ .switch-label:after {
	opacity: 1;
}
.switch-handle {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 28px;
	height: 28px;
	background: linear-gradient(to bottom, #FFFFFF 40%, #f0f0f0);
	background-image: -webkit-linear-gradient(top, #FFFFFF 40%, #f0f0f0);
	border-radius: 100%;
	box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
}
.switch-handle:before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -6px 0 0 -6px;
	width: 12px;
	height: 12px;
	background: linear-gradient(to bottom, #eeeeee, #FFFFFF);
	background-image: -webkit-linear-gradient(top, #eeeeee, #FFFFFF);
	border-radius: 6px;
	box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
}
.switch-input:checked ~ .switch-handle {
	left: 74px;
	box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
}
 
/* Transition
========================== */
.switch-label, .switch-handle {
	transition: All 0.3s ease;
	-webkit-transition: All 0.3s ease;
	-moz-transition: All 0.3s ease;
	-o-transition: All 0.3s ease;
}

/////

#showAll {
    a {
        color: #777;
        border-bottom: 1px dashed #777;

        &:hover {
            color: #363636;
            border-bottom: 1px solid #363636;
            text-decoration: none;
        }
    }
}

.darkmode {
    body {
        background: $dark-purple;
        color: $dark-fg;
    }
    .navbar {
        background: $dark-purple;

        .navbar-brand {
            filter: invert(1);
        }

        .navbar-item {
            color: #888;

            &:hover {
                color: #EEE;
            }
        }
    }

    .box.cta {
        background: $dark-purple2;
        color: $dark-fg2;
    }

    .title, .subtitle {
        color: $dark-fg;
    }

    .card {
        background: $dark-purple2;
        color: $dark-fg2;
        border: 1px solid #000;

        svg {
            filter: invert(0.8);
        }
    }

    .sidebar {
        filter: invert(1);
    }

    a {
        color: #8ae190;
    }

    code {
        background: black;
        color: #DAD;
    }

    .motto {
        text-shadow: rgba(0, 0, 0, 50%) 0px 3px 3px
    }

    .footer {
        background: black;

        a.footer-icon {
            color: #DAD;
        }
    }
}

@mixin alertStyle($color) {
    border-left-color: $color; 
    .alert-message {
        color: $color;
        svg {
            fill: $color;
        }
    }
}

blockquote {
    &.alert {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        padding-left: 1rem;
        
        background-color: inherit !important;
        border-left-width: 5px;
        border-left-style: solid;

        .alert-message {
            display: inline-flex;
            align-items: center;
            margin-bottom: 0.7rem;

            font-weight: 600;

            svg {
                margin-right: 0.5rem;
            }
        }

        &.alert-tip         { 
            @include alertStyle(#428546);
        }
        &.alert-note        { 
            @include alertStyle(#296BD3); 
        }
        &.alert-important   { 
            @include alertStyle(#7A58D7); 
        }
        &.alert-warning     { 
            @include alertStyle(#936821); 
        }
        &.alert-caution     { 
            @include alertStyle(#BF3536);
        }
    }
}